.class Lrexsee/core/browser/RexseeUrl$25;
.super Lrexsee/core/browser/clazz/UrlListener;
.source "RexseeUrl.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/core/browser/RexseeUrl;-><init>(Lrexsee/core/browser/Browser;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/core/browser/RexseeUrl;


# direct methods
.method constructor <init>(Lrexsee/core/browser/RexseeUrl;Ljava/lang/String;)V
    .locals 0
    .param p2, "$anonymous0"    # Ljava/lang/String;

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/core/browser/RexseeUrl$25;->this$0:Lrexsee/core/browser/RexseeUrl;

    .line 635
    invoke-direct {p0, p2}, Lrexsee/core/browser/clazz/UrlListener;-><init>(Ljava/lang/String;)V

    return-void
.end method


# virtual methods
.method public run(Landroid/content/Context;Lrexsee/core/browser/Browser;Ljava/lang/String;)V
    .locals 12
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "browser"    # Lrexsee/core/browser/Browser;
    .param p3, "url"    # Ljava/lang/String;

    .prologue
    .line 638
    invoke-virtual {p2}, Lrexsee/core/browser/Browser;->copyBackForwardList()Landroid/webkit/WebBackForwardList;

    move-result-object v8

    .line 639
    .local v8, "history":Landroid/webkit/WebBackForwardList;
    invoke-virtual {v8}, Landroid/webkit/WebBackForwardList;->getCurrentIndex()I

    move-result v7

    .line 640
    .local v7, "currentIndex":I
    new-instance v10, Lrexsee/core/menu/PopMenu;

    new-instance v1, Ljava/lang/StringBuilder;

    iget-object v2, p2, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v2, v2, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v2, v2, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ":original_history"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "label:WebKit "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v3, Lrexsee/core/lang/RexseeLanguage;->TITLE_HISTORY:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ";"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v10, p2, v1, v2}, Lrexsee/core/menu/PopMenu;-><init>(Lrexsee/core/browser/Browser;Ljava/lang/String;Ljava/lang/String;)V

    .line 641
    .local v10, "popMenu":Lrexsee/core/menu/PopMenu;
    invoke-virtual {v8}, Landroid/webkit/WebBackForwardList;->getSize()I

    move-result v1

    const/4 v2, 0x1

    sub-int v9, v1, v2

    .local v9, "i":I
    :goto_0
    if-gez v9, :cond_0

    .line 652
    iget-object v1, p0, Lrexsee/core/browser/RexseeUrl$25;->this$0:Lrexsee/core/browser/RexseeUrl;

    # getter for: Lrexsee/core/browser/RexseeUrl;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v1}, Lrexsee/core/browser/RexseeUrl;->access$3(Lrexsee/core/browser/RexseeUrl;)Lrexsee/core/browser/Browser;

    move-result-object v1

    iget-object v1, v1, Lrexsee/core/browser/Browser;->menu:Lrexsee/core/menu/RexseeMenu;

    invoke-virtual {v1, v10}, Lrexsee/core/menu/RexseeMenu;->open(Lrexsee/core/menu/PopMenu;)V

    .line 653
    return-void

    .line 643
    :cond_0
    if-ne v9, v7, :cond_1

    .line 644
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "<font color=red>"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v8, v9}, Landroid/webkit/WebBackForwardList;->getItemAtIndex(I)Landroid/webkit/WebHistoryItem;

    move-result-object v2

    invoke-virtual {v2}, Landroid/webkit/WebHistoryItem;->getTitle()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "<br><I>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v8, v9}, Landroid/webkit/WebBackForwardList;->getItemAtIndex(I)Landroid/webkit/WebHistoryItem;

    move-result-object v2

    invoke-virtual {v2}, Landroid/webkit/WebHistoryItem;->getUrl()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "</I></font>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    .line 648
    .local v11, "title":Ljava/lang/String;
    :goto_1
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "label:"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ";font-size:14px;"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 649
    .local v4, "s":Ljava/lang/String;
    new-instance v0, Lrexsee/core/menu/PopMenuItem;

    invoke-virtual {v8, v9}, Landroid/webkit/WebBackForwardList;->getItemAtIndex(I)Landroid/webkit/WebHistoryItem;

    move-result-object v1

    invoke-virtual {v1}, Landroid/webkit/WebHistoryItem;->getTitle()Ljava/lang/String;

    move-result-object v2

    const/4 v3, 0x0

    move-object v1, p1

    move-object v5, v4

    move-object v6, v4

    invoke-direct/range {v0 .. v6}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 650
    .local v0, "item":Lrexsee/core/menu/PopMenuItem;
    invoke-virtual {v10, v0}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 641
    add-int/lit8 v9, v9, -0x1

    goto :goto_0

    .line 646
    .end local v0    # "item":Lrexsee/core/menu/PopMenuItem;
    .end local v4    # "s":Ljava/lang/String;
    .end local v11    # "title":Ljava/lang/String;
    :cond_1
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-virtual {v8, v9}, Landroid/webkit/WebBackForwardList;->getItemAtIndex(I)Landroid/webkit/WebHistoryItem;

    move-result-object v2

    invoke-virtual {v2}, Landroid/webkit/WebHistoryItem;->getTitle()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "<br><I>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v8, v9}, Landroid/webkit/WebBackForwardList;->getItemAtIndex(I)Landroid/webkit/WebHistoryItem;

    move-result-object v2

    invoke-virtual {v2}, Landroid/webkit/WebHistoryItem;->getUrl()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "</I>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    .restart local v11    # "title":Ljava/lang/String;
    goto :goto_1
.end method

.method public shouldAddToHistory(Landroid/content/Context;Lrexsee/core/browser/Browser;Ljava/lang/String;)Z
    .locals 1
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "browser"    # Lrexsee/core/browser/Browser;
    .param p3, "url"    # Ljava/lang/String;

    .prologue
    .line 656
    const/4 v0, 0x0

    return v0
.end method
